<?php
include "admin.php";
if(!isset($_GET['uc_id']) && !isset($_GET['detail']) && !isset($_GET['delete'])) exit();
if(isset($_GET['uc_id'])){
	$res1=mysql_query('Select * From '.USERS_COMMENTS.' Where uc_id='.$_GET['uc_id'].'');
	$r1=mysql_fetch_array($res1);
	if($r1['uc_status']==1)
		$res2 = mysql_query("Update ".USERS_COMMENTS." Set uc_status=0 Where uc_id=".$_GET['uc_id']." ");
	else
		$res2 = mysql_query("Update ".USERS_COMMENTS." Set uc_status=1 Where uc_id=".$_GET['uc_id']." ");
header('Location:users_comment.php');
}
if(isset($_GET['detail'])):
$res3=mysql_query('Select * From '.USERS_COMMENTS.' Where uc_id='.$_GET['detail'].'');
$r3=mysql_fetch_array($res3);
?>
<form>
<table width="100%" border="0" cellpadding="5" cellspacing="5">
  <tr>
    <td>Name</td>
    <td><?php echo $r3['uc_name']; ?></td>
  </tr>
  <tr>
    <td>Title</td>
    <td><?php echo $r3['uc_title']; ?></td>
  </tr>
  <tr>
    <td>Clinic Name</td>
    <td><?php echo $r3['uc_clinic']; ?></td>
  </tr>
  <tr>
    <td>Email</td>
    <td><?php echo $r3['uc_email']; ?></td>
  </tr>
  <tr>
    <td>Country</td>
    <td><?php echo $r3['uc_country']; ?></td>
  </tr>
  <tr>
    <td>Year of purchasing the MADSEN Astera</td>
    <td><?php echo $r3['uc_year']; ?></td>
  </tr>
</table>
 </form>
<?php
endif;
?>